package com.abso.mp3tunes.locker.ui;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

/**
 * Defines the layout of the MP3tunes UI plug-in perspective.
 */
public class LockerPerspectiveFactory implements IPerspectiveFactory {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
	 */
	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		IFolderLayout bottomFolder = layout.createFolder("bottom",
				IPageLayout.BOTTOM, (float) 0.65, editorArea);
		IFolderLayout bottomLeftFolder = layout.createFolder("bottomLeft",
				IPageLayout.LEFT, (float) 0.40, "bottom");
		bottomLeftFolder.addView(ILockerConstants.ID_MUSIC_PLAYER_VIEW);
		bottomFolder.addView(IPageLayout.ID_PROP_SHEET);
		bottomFolder.addView("org.eclipse.pde.runtime.LogView");
		IFolderLayout leftFolder = layout.createFolder("left",
				IPageLayout.LEFT, (float) 0.30, editorArea);
		leftFolder.addView(ILockerConstants.ID_LOCKER_BROWSER_VIEW);
		layout.addShowViewShortcut(ILockerConstants.ID_LOCKER_BROWSER_VIEW);
		layout.addShowViewShortcut(ILockerConstants.ID_MUSIC_PLAYER_VIEW);
		layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
	}

}
